package com.truongnha.clienttn.business.model;

import android.util.Log;

import com.truongnha.clienttn.data.entity.AccountEntity;

public class UserModel {
	private String lastName;
	private String firstName;
	private String user_name;
	private String userType;
	private String _class;
	private String school;
	private String birthday;
	private String userId;

	public UserModel(String lastName, String firstName, String user_name,
			String userType, String _class, String school, String birthday,
			String userId) {
		super();
		this.lastName = lastName;
		this.firstName = firstName;
		this.user_name = user_name;
		this.userType = userType;
		this._class = _class;
		this.school = school;
		this.birthday = birthday;
		this.userId = userId;
	}

	public UserModel(AccountEntity ac) {
		super();
		this.lastName = ac.getLastName();
		this.firstName = ac.getFirstName();
		this.user_name = ac.getUser_name();
		this.userType = ac.getUserType();
		this._class = ac.get_class();
		this.school = ac.getSchool();
		this.birthday = ac.getBirthday();
		this.userId = ac.getUserId();
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getUser_name() {
		return user_name;
	}

	public void setUser_name(String user_name) {
		this.user_name = user_name;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public String get_class() {
		return _class;
	}

	public void set_class(String _class) {
		this._class = _class;
	}

	public String getSchool() {
		return school;
	}

	public void setSchool(String school) {
		this.school = school;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getPosition() {
		Log.d("LOG", "get position");
		Log.d("LOG", "user type" + userType);
		if (userType.equals("1"))
			return "STUDENT";
		else if (userType.equals("3"))
			return "TEACHER";
		Log.d("LOG", "end get position");
		return "Error";

	}
}
